<template>
  <div class="home">
    <div class="content-container">
      <p class="title">课程管理系统</p>
      
      <el-input 
        placeholder="请输入用户名" 
        prefix-icon="el-icon-user"  
        :style="{ width: '200px', height: '30px', textAlign: 'center' }"
      ></el-input><br>
      
      <el-input 
        placeholder="请输入密码" 
        prefix-icon="el-icon-lock"
        type="password"
        :style="{ width: '200px', height: '30px', textAlign: 'center' }"
      ></el-input><br>
      
      <div class="radio-group">
        <el-radio v-model="radio" label="teacher">教师</el-radio>
        <el-radio v-model="radio" label="admin">教务管理员</el-radio>
      </div>
      
      <el-button 
        type="primary" 
        :style="{ width: '200px', height: '30px', lineHeight: '5px', textAlign: 'center' }">
        登录
      </el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      radio: 'teacher'
    };
  }
}
</script>

<style lang="scss">
.home {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url(../../public/img/OIP-C.jpg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.content-container {
  background-color: rgba(255, 255, 255, 0.5);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center; /* 子元素水平居中 */
}

.title {
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 20px;
  color: #303133;
}

.radio-group {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  width: 100%; /* 确保宽度占满容器 */
}

/* 调整 Element UI 输入框内图标的位置 */
::v-deep .el-input__prefix {
  left: 15px; /* 微调图标位置 */
}

/* 调整输入框内文本的位置 */
::v-deep .el-input__inner {
  padding-left: 30px !important; /* 增加左内边距 */
  padding-right: 15px !important; /* 调整右内边距 */
}

/* 调整单选按钮的样式 */
::v-deep .el-radio {
  margin: 0 10px; /* 增加按钮之间的间距 */
}

/* 调整按钮的样式 */
.el-button {
  margin-top: 10px;
}
</style>